package file;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;

public class testFile {
	public static void main(String[] args) {
		File files = new File("E:\\temp\\img");
		System.out.println(files.listFiles().length);
		for(File f: files.listFiles()) {
			System.out.println(f.getPath());
//			System.out.println(new Date(f.lastModified()));
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
			System.out.println(sdf.format(new Date(f.lastModified())));
			f.delete();
		}
		String test = "{\"boxCode\":\"BC1002210428260019497213\",\"boxType\":\"正普\",\"machineCode\":\"XMTAFJ-KJ-SORT-001\",\"mailCount\":2,\"chuteCode\":\"2004\",\"createTime\":\"2021-04-28 14:09:01.591\",\"receiveSiteCode\":\"150223\",\"materialCode\":null}";
		System.out.println(test);
	}
}
